import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import './static/common.less';
import App from './App';

import {ChakraProvider} from '@chakra-ui/react';
import {extendTheme} from '@chakra-ui/react';

import {HashRouter as Router} from 'react-router-dom';

import DB from '@/utils/db';
window.db = new DB({name: 'lessCode'});

const theme = extendTheme({
    sizes: {
        xxs: {
            h: '56px',
            fontSize: 'lg',
            px: '32px'
        }
    }
});

ReactDOM.render(
    <React.StrictMode>
        <ChakraProvider theme={theme}>
            <Router>
                <App />
            </Router>
        </ChakraProvider>
    </React.StrictMode>,
    document.getElementById('root')
);
